Class ADMTopicSubscriber


  • public class ADMTopicSubscriber
    extends java.lang.Object
    ADM's Topic subscriber class to handle the device subscription and unsubscription to/from a topic.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.android.gms.tasks.Task<java.lang.Void> subscribeToTopic​(android.content.Context context, java.lang.String topic)
      Invokes getTask with runnable subscribe method which internally invokes ADM's subscribeToTopic.
      com.google.android.gms.tasks.Task<java.lang.Void> unsubscribeFromTopic​(android.content.Context context, java.lang.String topic)
      Invokes getTask with runnable unsubscribe method which internally invokes ADM's unsubscribeFromTopic.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ADMTopicSubscriber

        public ADMTopicSubscriber()
    • Method Detail

      • subscribeToTopic

        public com.google.android.gms.tasks.Task<java.lang.Void> subscribeToTopic​(android.content.Context context,
                                                                                  java.lang.String topic)
        Invokes getTask with runnable subscribe method which internally invokes ADM's subscribeToTopic.
        Parameters:
        context - App Context
        topic - Topic to which the app instance is to be subscribed.
        Returns:
        Task which can be used by completion listener to determine whether the subscription completed.
      • unsubscribeFromTopic

        public com.google.android.gms.tasks.Task<java.lang.Void> unsubscribeFromTopic​(android.content.Context context,
                                                                                      java.lang.String topic)
        Invokes getTask with runnable unsubscribe method which internally invokes ADM's unsubscribeFromTopic.
        Parameters:
        context - App Context
        topic - Topic to which the app instance is to be unsubscribed.
        Returns:
        Task which can be used by completion listener to determine whether the unsubscription completed.